﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Eventable
{
    public interface IEventProvider
    {
        bool ListenEvent(string nameEvent, EventHandlerParams handler);
        bool UnlistenEvent(string nameEvent, EventHandlerParams handler);
        bool NotifyEvent(string nameEvent, params object[] args);
    }

    public interface IEventHandleObject
    {
        string GetNameFromHandle(EventHandlerParams eh);
        EventHandlerParams GetHandleFromName(string nameHandle);
    }

    /// <summary>
    /// Дескриптор метода обработчика события
    /// </summary>
    /// <param name="sender">Генератор события</param>
    /// <param name="args">Аргументы события</param>
    /// <returns></returns>
    public delegate bool EventHandlerParams(object sender, string nameEvent, params object[] args);

}
